@echo off
setlocal enabledelayedexpansion
set path=D:\programs\gow\;d:\programs\7z;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;%path%
cd /d %~dp0
net stop OneSysWeb 2>nul
set month=%DATE:~5,2%
set day=%DATE:~8,2%
set hour=%TIME:~0,2%
set hour=%hour: =0%
set min=%TIME:~3,2%
if [%1] EQU [true] (
call d:\pyenv\3b\onesysweb\scripts\activate.bat 
cd .\ones
del yads
mklink /D yads onedrilling\py\src\yads
cp ..\references .\yads\proxy
python setup.py sdist --release
cd ..
cd .\pyiscwsa
python setup.py sdist
cd ..
pip install ones\dist\ones-2.0.0.tar.gz
pip install pyiscwsa\dist\pyiscwsa-1.0.0.tar.gz
BaiduPCS-Go mv /Deploy/OneSys/ones-2.0.0.tar.gz /Deploy/OneSys/ones^(!month!!day!!hour!!min!^)-2.0.0.tar.gz | iconv -f utf-8 -t cp936
BaiduPCS-Go u ones\dist\ones-2.0.0.tar.gz /Deploy/OneSys | iconv -f utf-8 -t cp936
BaiduPCS-Go mv /Deploy/OneSys/pyiscwsa-1.0.0.tar.gz /Deploy/OneSys/pyiscwsa^(!month!!day!!hour!!min!^)-1.0.0.tar.gz | iconv -f utf-8 -t cp936
BaiduPCS-Go u pyiscwsa\dist\pyiscwsa-1.0.0.tar.gz /Deploy/OneSys | iconv -f utf-8 -t cp936
)
net start OneSysWeb